package com.kl.rabbitmqconsumer.direct;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 指定监听的队列名称 TestDirectQueue
 */
@Component
@RabbitListener(queues = "TestDirectQueue")
public class DirectReceiverB {

    @RabbitHandler
    public void process(Map<String, Object> testMessage) {
        System.out.println("DirectReceiverB消费者收到消息  : " + testMessage.toString());
    }

}